package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 * @author hua
 * @since 2024-11-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_platform_order_regular")
public class PlatformOrderRegularDo extends Model<PlatformOrderRegularDo> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 状态 0 启用 1停用
     */
    @TableField("status")
    private Integer status;

    /**
     * 规则名称
     */
    @TableField("regular_name")
    private String regularName;

    /**
     * 是否延迟生效 0不生效 1生效
     */
    @TableField("delay_type")
    private Integer delayType;

    /**
     * 延迟时间(小时 0-24)
     */
    @TableField("delay_time")
    private Integer delayTime;

    /**
     * 应用范围 1 满足条件 2所有
     */
    @TableField("regular_type")
    private Integer regularType;

    /**
     * 客户id
     */
    @TableField(value = "company_id")
    private Long companyId;

    /**
     * 租户id
     */
    @TableField("tenant_id")
    private Long tenantId;

    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private Long createBy;

    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    @TableField(value = "update_by", fill = FieldFill.UPDATE)
    private Long updateBy;

    @TableField("delete_time")
    private Date deleteTime;

    @TableField("delete_by")
    private Long deleteBy;

    @TableField("sort")
    private Long sort;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
